package com.github.jspxnet.worktask.model.enums;

import com.github.jspxnet.enums.EnumType;

public enum WorkTaskEnumType implements EnumType {
    //比如 站内提醒 短信提醒 联动等，主动发起请求
    THIRD(9, "第三方触发"),

    JOIN(8, "合并节点"),

    ClassJob(7, "java类对象"),

    Http(6, "HTTP回调"),

    SCRIPT(5, "脚本控制"),

    SIGNED(4, "签收"),

    COPYED(3, "抄送节点"),
    //所有
  //  AND(2, "会签"),

    //有人数 默认为1
    AUDIT(1, "审核"),

    NONE(0, "无动作");

    private final int value;
    private final String name;

    WorkTaskEnumType(int value, String name) {
        this.value = value;
        this.name = name;
    }

    static public WorkTaskEnumType find(int value) {
        for (WorkTaskEnumType c : WorkTaskEnumType.values()) {
            if (c.value == value) {
                return c;
            }
        }
        return WorkTaskEnumType.NONE;
    }

    @Override
    public int getValue() {
        return this.value;
    }

    @Override
    public String getName() {
        return this.name;
    }

}
